export interface Maintainer {
  username: string;
  name: string;
  email: string;
}

export interface DistTag {
  experimental: string;
  latest: string;
  "latest-0": string;
  "latest-2": string;
  next: string;
  v1: string;
}

export interface _npmUser {
  name: string;
  email: string;
}

export interface Publisher {
  username: string;
  email: string;
}

export interface NpmPackageInfo {
  name: string;
  version: string;
  _rev: string;
  scope: string;
  keywords: string[];
  versions: string[];
  description: string;
  license: string;
  maintainers: Maintainer[];
  "dist-tags": DistTag;
  date: string;
  created: string;
  modified: string;
  _source_registry_name: string;
  _npmUser: _npmUser;
  publish_time: number;
  publisher: Publisher;
}

export interface NpmDownloadInfo {
  all: number;
}

export interface NpmPackageObject {
  package: NpmPackageInfo;
  downloads: NpmDownloadInfo;
}

export interface NpmmirrorSearchResponse {
  total: number;
  objects: NpmPackageObject[];
}
